prime train: --cluster flag overrides config cluster_name#717
Open
JannikSt wants to merge 1 commit into
Open
Conversation
Adds a `--cluster <name>` option to `prime train <config>` so users can retarget a single dispatch without editing the TOML. The flag wins over `cluster_name = "..."` in the config and forwards to the backend's `cluster_name` payload field; the server's picker is the source of truth for whether the cluster exists, is allocated, and has capacity, so client-side validation stays out of the way. Also exercised by the legacy `prime rl run` alias since both commands share the same `create_run` entrypoint.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a
--cluster <name>flag toprime train <config>so users can retarget a single dispatch without editing the TOML. The flag wins overcluster_namein the config and forwards to the backend payload — the server returns a clear 400 if the cluster is unknown or out of capacity.RLClient.create_runprime rl runalias too (shared entrypoint)Note
Low Risk
CLI-only override of an existing dispatch field; cluster enforcement remains on the backend with no new client-side validation logic.
Overview
Adds
--cluster <name>toprime train <config.toml>so a single launch can pin dispatch to a named cluster without editing the TOML. When set, it overridescluster_namein the config and is sent toRLClient.create_runas before; cluster validity and capacity are left to the backend (documented as a hard 400, no client-side name check).CLI tests cover
--helpvisibility, flag-over-TOML behavior, and the unchanged path when the flag is omitted (still uses configcluster_name).Reviewed by Cursor Bugbot for commit c345a1b. Bugbot is set up for automated code reviews on this repo. Configure here.